#include <iostream>


using namespace std;

class standard:public memory{
    public:
        standard();
        ~standard();
        void mem(bus2_t* line);
        void wrapup();
};

standard::standard(){

    cycles = 0;
    cache = 0;
    misses = -1;
    conflicts = -1;

}

//Calls process to process the line and updates cycles and conflicts.
void standard::mem(struct bus2_t* line){

    process(line);

    //random access time of 8 and bus transfer of 1 makes it 9 cycles.
    cycles += 9;
    conflicts++;

}

//calculates the bandwith and outputs it.
void standard::wrapup(){

    bytes = cache * 4;
    bandwidth = (float)bytes/cycles;
    cout << "output of Standard memory\n Bank conflicts: " << conflicts <<
    "\n Bandwidth: " << bandwidth << endl << endl;
}
